package com.zwj.gulimall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.zwj.common.valid.IntOptions;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.naming.Name;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 品牌
 *
 * @author zwJ
 * @email 1115125167@qq.com
 * @date 2020-08-03 22:41:12
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 品牌id
     */
    @TableId
    private Long brandId;
    /**
     * 品牌名
     */
    @NotEmpty(message = "品牌名不能为空")
    private String name;
    /**
     * 品牌logo地址
     */
    @URL(message = "品牌logo得是一个url")
    private String logo;
    /**
     * 介绍
     */
    private String descript;
    /**
     * 显示状态[0-不显示；1-显示]
     */
    @IntOptions(vals = {0, 1})
    private Integer showStatus;
    /**
     * 检索首字母
     */
    @Pattern(regexp = "/^[a-zA-Z]$/")
    @Size(min = 1, max = 1)
    @NotEmpty(message = "检索首字母不能为空")
    private String firstLetter;
    /**
     * 排序
     */
    @NotNull(message = "排序字段不能为空")
    private Integer sort;

}
